/** \file comm.c
 **
 ** multi-function Communication port operation file
 **
 ** History:
 **   - 2013-11-03  1.0  Mark  First Version
 *************************************************************************/


/*****************************************************************************/
/* Include files                                                             */
/*****************************************************************************/
#include "includes.h"
//#include "comm.h"

/*****************************************************************************/
/* Local pre-processor symbols/macros ('#define')                            */
/*****************************************************************************/

/*****************************************************************************/
/* Global variable definitions (declared in header file with 'extern')       */
/*****************************************************************************/

#ifndef UART_USE_L3
    #error UART_USE_L3 is missing
#endif

mfs_type_t	mfsn_type[8];
/*****************************************************************************/
/* Local type definitions ('typedef')                                        */
/*****************************************************************************/

/*****************************************************************************/
/* Local variable definitions ('static')                                     */
/*****************************************************************************/

void MFS0RX_IRQHandler(void)
{
	if(mfsn_type[0] == UART)
		UartRxIrqHandler(0);
	else if(mfsn_type[0] == CSIO_SLAVE)
		SpiRxIrqHandler(0);
	else if(mfsn_type[0] == I2C_SLAVE)
		I2cRxIrqHandler(0);
}

void MFS0TX_IRQHandler(void)
{

}

void MFS1RX_IRQHandler(void)
{
	if(mfsn_type[1] == UART)
		UartRxIrqHandler(1);
	else if(mfsn_type[1] == CSIO_SLAVE)
		SpiRxIrqHandler(1);
	else if(mfsn_type[1] == I2C_SLAVE)
		I2cRxIrqHandler(1);
}

void MFS1TX_IRQHandler(void)
{

}

void MFS2RX_IRQHandler(void)
{
	if(mfsn_type[2] == UART)
		UartRxIrqHandler(2);
	else if(mfsn_type[2] == CSIO_SLAVE)
		SpiRxIrqHandler(2);
	else if(mfsn_type[2] == I2C_SLAVE)
		I2cRxIrqHandler(2);
}

void MFS2TX_IRQHandler(void)
{

}

void MFS3RX_IRQHandler(void)
{
	if(mfsn_type[3] == UART)
		UartRxIrqHandler(3);
	else if(mfsn_type[3] == CSIO_SLAVE)
		SpiRxIrqHandler(3);
	else if(mfsn_type[3] == I2C_SLAVE)
		I2cRxIrqHandler(3);
}

void MFS3TX_IRQHandler(void)
{

}

void MFS4RX_IRQHandler(void)
{
	if(mfsn_type[4] == UART)
		UartRxIrqHandler(4);
	else if(mfsn_type[4] == CSIO_SLAVE)
		SpiRxIrqHandler(4);
	else if(mfsn_type[4] == I2C_SLAVE)
		I2cRxIrqHandler(4);
}

void MFS4TX_IRQHandler(void)
{

}

void MFS5RX_IRQHandler(void)
{
	if(mfsn_type[5] == UART)
		UartRxIrqHandler(5);
	else if(mfsn_type[5] == CSIO_SLAVE)
		SpiRxIrqHandler(5);
	else if(mfsn_type[5] == I2C_SLAVE)
		I2cRxIrqHandler(5);
}

void MFS5TX_IRQHandler(void)
{

}

void MFS6RX_IRQHandler(void)
{
	if(mfsn_type[6] == UART)
		UartRxIrqHandler(6);
	else if(mfsn_type[6] == CSIO_SLAVE)
		SpiRxIrqHandler(6);
	else if(mfsn_type[6] == I2C_SLAVE)
		I2cRxIrqHandler(6);
}

void MFS6TX_IRQHandler(void)
{

}

void MFS7RX_IRQHandler(void)
{
	if(mfsn_type[7] == UART)
		UartRxIrqHandler(7);
	else if(mfsn_type[7] == CSIO_SLAVE)
		SpiRxIrqHandler(7);
	else if(mfsn_type[7] == I2C_SLAVE)
		I2cRxIrqHandler(7);
}

void MFS7TX_IRQHandler(void)
{

}

